
//Table 3 final run

log using "$rootpath/log/Table_3_Results.log", replace
use "$rootpath/processed_data/TAB3_Estimation_Data.dta", clear
eststo clear
rename avg_log_budget budget
rename avg_manufact manufact
rename avg_old_code_prob Policy
foreach var of varlist budget - violationproblem {
	
	regress `var' Policy if state!="AK"&state!="HI", robust
	estimates store res_`var'
}


esttab res_enforcementproblem res_penaltyproblem res_inspectionproblem res_manufact res_budget using "$rootpath/table_graph/Table3.tex",  star( * 0.1 ** 0.05 *** 0.01) cells(b(star fmt(3)) se(par fmt(3))) keep(Policy) scalars(N F) r2 replace 
log close
